#include<bits/stdc++.h>
using namespace std;
int n, k;
int bin_search() {
    int l=0, r=n;
    while(l+1<r) {
        int mid = (l+r)/2;
        int rem = n-(1+mid*2);
        if(rem<=k+2) {
            r = mid;
        }
        else
            l = mid;
    }
    return r;
}
int main() {
    int tc; cin>>tc;
    while(tc--) {
        cin>>n>>k;
        cout<<"ddm "<<(bin_search()%2==0?"yyds\n":"cry\n");
    }
}
